home *** CD-ROM | disk | FTP | other *** search
- Path: news.sprintlink.net!datalytics!news
- From: Rob Stewart <stew@datalytics.com>
- Newsgroups: comp.lang.c++
- Subject: Re: MFC v.s. OWL class libraries
- Date: 4 Jan 1996 20:52:57 GMT
- Organization: Datalytics, Inc
- Message-ID: <4chen9$ldg@gold.datalytics.com>
- References: <4cbkfq$255@charm.magnus.acs.ohio-state.edu>
- NNTP-Posting-Host: pc071.datalytics.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.22 (Windows; I; 32bit)
-
- James Saunders <saunders@cfm.ohio-state.edu> wrote:
- >Would somebody please comment on the relative strengths and weaknesses of
- >these two class libraries?
- >I am curious to know if MFC is becoming the library of choice for windows
- >development.
- >We currently use BC++ 4.52, and we are considering getting VC++ 4.0 for
- >future development, mainly because the MFCes appears to be more widely
- >used for current development, and this is likely to become more true.
- >Are we wrong in our conclusions?
- >
-
- The Zenith Z-100 was a better machine than the IBM PC. The
- Beta videotape format is (nearly was) a better format than the
- VHS format. Better isn't always the winner.
-
- I have no experience with OWL, so I will only discuss MFC.
- (First, my bias: I came from the UNIX world to Windows
- development. I've been working with Win32 and MFC for
- slightly more than a year now.)
-
- MFC is a thinly veiled C++ wrapper around the Win32 SDK C
- functions and data structures. (I won't get into naming
- conventions--that's another long story.) If you are familiar
- with the Win32 SDK, you'll find it pretty straightforward
- migrating to MFC's peculiar brand of C++ code.
-
- On the other hand, if you're not particularly familiar with
- the Win32 SDK and you thought OOA/OOD/OOP meant things like
- encapsulation, inheritance, polymorphism, etc., you'll be
- disappointed in what you see in the MFC classes. Microsoft
- makes great use of public data members, oddly named member
- functions (same name as in the SDK, but not entirely
- appropriate in the object.function paradigm), non-functional
- constructors, ridiculous compilations of functionality in
- one class, variable const-correctness, etc.
-
- MS uses c'tors to little or nothing in most of its classes.
- You must call another member function to do the "real"
- initialization. This makes it easy enough to make arrays of
- such objects, but they could have provided an overloaded c'tor
- in each case to do the initialization at construction (by
- calling the initialization function--tough job to code it,
- huh?).
-
- One of the most ridiculous things they do is to self delete
- objects. A number of their classes must be allocated on the
- heap. Upon receipt of certain Windows messages, these objects
- delete themselves from the heap. Try debugging that!
-
- In summary, MS made no attempt to build a decent OO framework.
- They wrapped a bunch of C functions to simplify some things
- and make some things more type safe. They did not capitalize
- on inheritance in the many places they should have (a combo
- box is not derived from a list box, for example).
-
- --
- Robert Stewart | My opinions are usually my own.
- Datalytics, Inc.
- (513)226-7700
- stew@datalytics.com
-
-
-